package com.jiyun.om.entity;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serializable;
import java.util.Date;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 运单表
 * </p>
 *
 * @author zhx
 * @since 2025-02-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("waybill")
@Schema(description = "运单表")
public class Waybill implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "主键自增")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "运单号")
    private String waybillId;

    @Schema(description = "始发地")
    private String origin;

    @Schema(description = "目的地")
    private String destination;

    @Schema(description = "运单状态")
    private String status;

    @Schema(description = "运输方式外键id")
    private Integer smid;
    @TableField(exist = false)
    @Schema(description = "运输方式")
    private String transportMode;

    @Schema(description = "承运商外键id")
    private Integer cid;
    @TableField(exist = false)
    @Schema(description = "承运商")
    private String carrier;
    @TableField(exist = false)
    @Schema(description = "承运商联系人姓名")
    private String carrierContactName;
    @TableField(exist = false)
    @Schema(description = "承运商联系人手机号")
    private String carrierContactPhone;

    @Schema(description = "司机外键id")
    private Integer did;

    @TableField(exist = false)
    @Schema(description = "司机")
    private String driverName;

    @TableField(exist = false)
    @Schema(description = "司机手机号")
    private String driverPhone;

    @Schema(description = "汽车外键id")
    private Integer vid;

    @TableField(exist = false)
    @Schema(description = "车牌号")
    private String licensePlate;

    @TableField(exist = false)
    @Schema(description = "车型")
    private String vehicleModel;

    @TableField(exist = false)
    @Schema(description = "车长")
    private String vehicleLength;

    @Schema(description = "计费方式")
    private String billingMethod;

    @Schema(description = "运费合计")
    private BigDecimal totalFreight;

    @Schema(description = "计划发车时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date plannedDepartureTime;

    @Schema(description = "实际发车时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date actualDepartureTime;

    @Schema(description = "计划到达时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date plannedArrivalTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "实际到达时间")
    private Date actualArrivalTime;

    @Schema(description = "接单时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date orderTime;

    @Schema(description = "下单时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date placementTime;
    @TableField(exist = false)
    @Schema(description = "下单开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date placementTime1;
    @TableField(exist = false)
    @Schema(description = "下单结束时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date placementTime2;

    @Schema(description = "创建人")
    private String creator;

    @Schema(description = "创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date creationTime;


    @Schema(description = "数量")
    private Integer quantity;

    @Schema(description = "货物名称")
    private String cargoName;

    @Schema(description = "体积")
    private BigDecimal volume;

    @Schema(description = "重量")
    private BigDecimal weight;

    @Schema(description = "分摊运费")
    private BigDecimal sharedFreight;

    @Schema(description = "装卸费")
    private BigDecimal loadingUnloadingFee;

    @Schema(description = "包装费")
    private BigDecimal packagingFee;

    @Schema(description = "总数量")
    private Integer totalQuantity;

    @Schema(description = "总体积")
    private BigDecimal totalVolume;

    @Schema(description = "总重量")
    private BigDecimal totalWeight;

    @Schema(description = "运费成本")
    private BigDecimal freightCost;

    @Schema(description = "其他费用")
    private BigDecimal otherFees;

    @Schema(description = "现付")
    private BigDecimal cashOnDelivery;

    @Schema(description = "预付")
    private BigDecimal prepaid;

    @Schema(description = "到付")
    private BigDecimal collectOnDelivery;

    @Schema(description = "周期付")
    private BigDecimal periodicPayment;

    @Schema(description = "付费合计")
    private BigDecimal totalPayment;

    @Schema(description = "最后更新时间")
    private Date lastUpdateTime;

    @Schema(description = "最后更新人")
    private String lastUpdatedBy;


}
